package com.cib.process.chat.core.policy;

import com.cib.process.bean.IvrRequestServer;
import com.cib.process.bean.QueryRequestParam;

import java.util.Map;

public class CheckPaswdErrorPolicy extends AbstractActionErrorPolicy {
    @Override
    public void queryTextHandle(IvrRequestServer ivrRequestServer, QueryRequestParam queryRequestParam) {
        Map<String, String> lastResult = ivrRequestServer.getLastResult();
        String resulcode = lastResult.get("resulcode");
        if ("1".equals(resulcode)){
            queryRequestParam.setQueryText("1");
        }else if ("8".equals(resulcode)){
            queryRequestParam.setQueryText("8");
        }
    }
}
